# Maintainer:
pkgname=pipx
pkgver=1.4.1
pkgrel=0
pkgdesc="Install and Run Python Applications in Isolated Environments"
url="https://github.com/pypa/pipx"
arch="noarch"
license="MIT"
depends="
	py3-argcomplete
	py3-colorama
	py3-packaging
	py3-platformdirs
	py3-userpath
	"
makedepends="
	py3-gpep517
	py3-hatchling
	py3-hatch-vcs
	"
checkdepends="
	py3-pytest
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/pypa/pipx/archive/refs/tags/$pkgver.tar.gz"
options="!check" # need some packages that i'm not sure of

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -p no:warnings
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
04fa29b02a25f21544ae2bbc86fa927fd3c03f98b3f1bd6beee318cbb34849edfbd553fb3b9f94015aab16039aa49f706092a75bd2f865f04dec56a34da43f1f  pipx-1.4.1.tar.gz
"
